<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box1" onclick="fn()">请点击这里</div>
    <script type="text/javascript">
        function fn() {
            alert("我是弹出的内容");
        }
    </script>
</body>

</html>